package com.imooc;

import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.web.multipart.commons.CommonsMultipartResolver;
import org.springframework.web.servlet.config.annotation.ResourceHandlerRegistry;
import org.springframework.web.servlet.config.annotation.ViewControllerRegistry;
import org.springframework.web.servlet.config.annotation.WebMvcConfigurer;

//很多配置spring boot会自动帮你配置
//如果还是需要自己配置一些spring mvc的东西，可以创建一个spring mvc配置类
@Configuration
public class SpringMvcConfig implements WebMvcConfigurer{
	


	@Override
	public void addViewControllers(ViewControllerRegistry registry) {

		registry.addViewController("/index").setViewName("index");

	}
	

}
